package com.example.pceb.controller;


import com.example.pceb.entity.User;
import com.example.pceb.result.Result;
import com.example.pceb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/hello")
public class HelloWorld {
    @Autowired
    public UserService userService;

    @RequestMapping("/helloWorld")
    public Result<List<User>> hello() {
        return userService.selectAllUser();
    }
}
